home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 20 code / AOCE Templates / Custom.r < prev    next >
Encoding:
Text File  |  1994-09-23  |  7.2 KB  |  246 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Custom.r
  3.  
  4.     Contains:    A set of template which complement the USER template.
  5.  
  6.  
  7.     Copyright:    © 1993 by Apple Computer, Inc.
  8.  
  9. */
  10.  
  11. #include "OCE.r"
  12.  
  13.  
  14. //------------------  List of Templates
  15. #define kForward            kDETFirstID
  16. #define kEInfoPageAspect    kDETSecondID
  17. #define kEInfoPage            kDETThirdID
  18.  
  19.  
  20.  
  21. // ------------------  Properties
  22. #define    kFunction        kDETFirstDevProperty
  23.  
  24.  
  25. // ------------------  icon resources
  26. include "Custom.rsrcs" 'ICN#'(128) as 'ICN#'(kEInfoPageAspect+kDETAspectMainBitmap, purgeable);
  27. include "Custom.rsrcs" 'icl4'(128) as 'icl4'(kEInfoPageAspect+kDETAspectMainBitmap, purgeable);
  28. include "Custom.rsrcs" 'icl8'(128) as 'icl8'(kEInfoPageAspect+kDETAspectMainBitmap, purgeable);
  29. include "Custom.rsrcs" 'ics#'(128) as 'ics#'(kEInfoPageAspect+kDETAspectMainBitmap, purgeable);
  30. include "Custom.rsrcs" 'ics4'(128) as 'ics4'(kEInfoPageAspect+kDETAspectMainBitmap, purgeable);
  31. include "Custom.rsrcs" 'ics8'(128) as 'ics8'(kEInfoPageAspect+kDETAspectMainBitmap, purgeable);
  32.  
  33. include "UserInfoPageAspect.code" 'code'(1) as 'detc'(kEInfoPageAspect+kDETAspectCode,  purgeable);
  34.  
  35.  
  36. // -----------------------Aspect Template---------------------------
  37.  
  38. // Aspect template
  39. resource 'deta' (kEInfoPageAspect, purgeable) {
  40.     0,                    // Drop priority
  41.     dropCheckAlways,    // Drop check flag
  42.     notMainAspect,        // Not the main aspect
  43. };
  44.  
  45.  
  46. resource 'rstr' (kEInfoPageAspect+kDETTemplateName, purgeable) {
  47.     "ACFC InfoPage aspect"
  48. };
  49.  
  50. resource 'rstr' (kEInfoPageAspect+kDETRecordType, purgeable) {
  51.     "aoce User"
  52. };
  53.  
  54.  
  55. // drag and drop resources
  56.  
  57. resource 'rstr' (kEInfoPageAspect+kDETAspectDragInString, purgeable) {
  58.     "Do you want to add %3% “^3”% the selected items% to the company info for “^2” ?"
  59. };
  60.  
  61. resource 'rstr' (kEInfoPageAspect+kDETAspectDragInVerb, purgeable) {
  62.     "Add"
  63. };
  64.  
  65. resource 'rstr' (kEInfoPageAspect+kDETAspectDragInSummary, purgeable) {
  66.     "The object will be added to the sublist"
  67. };
  68.  
  69.  
  70.  
  71. // Built-in types can be dragged in the sublist:
  72. resource 'rst#' (kEInfoPageAspect+kDETAspectRecordDragIn,purgeable) {
  73.     {
  74.     "ACFC Keywords", "ACFC Alias keyword",
  75.     }
  76. };
  77.  
  78.  
  79. // human interface resources
  80. resource 'detm' (kEInfoPageAspect+kDETAspectViewMenu, purgeable) {
  81.     kEInfoPageAspect+kDETAspectViewMenu,
  82.     {
  83.      kDETPrName,                "By Name";
  84.      kDETPrKind,                "By Kind";
  85.     }
  86. };
  87.  
  88. resource 'rst#' (kEInfoPageAspect+kDETAspectBalloons,purgeable) {
  89.     {
  90.     "Description of the employee’s job","Function : Uneditable because the record is locked or access controled."
  91.     }
  92. };
  93.  
  94.  
  95. //------------------  Lookup Table
  96.  
  97. resource 'dett' (kEInfoPageAspect+kDETAspectLookup, purgeable) {
  98.     {
  99.     {"ACFC Company Empext Function"}, typeBinary,
  100.         useForInput, useForOutput, notInSublist, isNotAlias, isNotRecordRef,
  101.         {
  102.         'rstr',kFunction,0;
  103.         };
  104.     {"ACFC Alias keyword"}, typePackedDSSpec,
  105.         notForInput, notForOutput, useInSublist, isAlias, isNotRecordRef,
  106.         {};
  107.     }
  108. };
  109.  
  110.  
  111. // -----------------------info-page------------------------------------------
  112.  
  113. #define kDETUserInfoWindWidth            350
  114.  
  115. #define kDETInset                        10
  116. #define kDETSublistSpaceBetweenColumns    2
  117. #define kDETIconWidth                    16
  118. #define kDETItemLength                    150
  119.  
  120. /* label and edit field positions */
  121. #define kFunctionTop                30
  122. #define kFunctionLeft                10
  123. #define kFunctionBottom                kFunctionTop+kDETAppFontLineHeight+4
  124. #define kFunctionRight                kFunctionLeft+110
  125.  
  126. #define kTEFunctionTop                kFunctionTop
  127. #define kTEFunctionLeft                kFunctionRight+kDETSublistSpaceBetweenColumns
  128. #define kTEFunctionBottom            kTEFunctionTop+(3 * kDETAppFontLineHeight)
  129. #define kTEFunctionRight            kDETUserInfoWindWidth - kDETInset
  130.  
  131. /* sublist position */
  132. #define kSublistTop                    kTEFunctionBottom+24
  133. #define kSublistLeft                kFunctionLeft
  134. #define kSublistBottom                kSublistTop+kDETIconWidth*5
  135. #define kSublistRight                kDETUserInfoWindWidth - kDETInset
  136.  
  137. #define kSublistSeeAlsoTop            (kSublistTop-kDETAppFontLineHeight-4)
  138. #define kSublistSeeAlsoBottom        kSublistSeeAlsoTop+kDETAppFontLineHeight
  139. #define kSublistSeeAlsoLeft            kDETIconWidth+kDETSublistSpaceBetweenColumns
  140. #define kSublistSeeAlsoRight        kSublistSeeAlsoLeft+kDETItemLength
  141.  
  142. #define kSublistKindTop                kSublistSeeAlsoTop
  143. #define kSublistKindBottom            kSublistSeeAlsoBottom
  144. #define kSublistKindLeft            kSublistSeeAlsoRight+kDETSublistSpaceBetweenColumns
  145. #define kSublistKindRight            kSublistKindLeft+kDETItemLength
  146.  
  147. /* items in sublist */
  148. #define kSeeAlsoColumnLeft            kSublistSeeAlsoLeft
  149. #define kSeeAlsoColumnRight            kSublistSeeAlsoRight
  150.  
  151. #define kKindColumnLeft                kSublistKindLeft
  152. #define kKindColumnRight            kSublistKindRight
  153.  
  154. #define kDETSublistIconColumnLeft    kDETSublistSpaceBetweenColumns
  155. #define kDETSublistIconColumnRight    kDETSublistIconColumnLeft + kDETIconWidth
  156.  
  157. #define kDETSublistEntryTop            -kDETAppFontLineHeight/2
  158. #define kDETSublistEntryBottom        kDETSublistEntryTop + kDETAppFontLineHeight
  159.  
  160. // info page signature resource
  161. resource 'deti' (kEInfoPage, purgeable) {
  162.     4000,                // sort-order number,info-page must be placed after standard ones
  163.     {kSublistTop,kSublistLeft,kSublistBottom,kSublistRight},
  164.     noSelectFirstText,
  165.     {
  166.     kDETNoProperty, kDETNoProperty, kEInfoPage;
  167.     },
  168.     {
  169.     kDETNoProperty, kDETNoProperty, kEInfoPage+1;
  170.     }
  171. };
  172.  
  173. resource 'rstr' (kEInfoPage+kDETTemplateName, purgeable) {
  174.     "ACFC 1stInfoPage"
  175. };
  176.  
  177. resource 'rstr' (kEInfoPage+kDETRecordType, purgeable) {
  178.     "aoce User"
  179. };
  180.  
  181.  
  182.  
  183. resource 'rstr' (kEInfoPage+kDETInfoPageName, purgeable) {
  184.     "Company Info"
  185. };
  186.  
  187. resource 'rstr' (kEInfoPage+kDETInfoPageMainViewAspect, purgeable) {
  188.     "ACFC InfoPage aspect"
  189. };
  190.  
  191.  
  192.  
  193. // info page view list
  194. resource 'detv' (kEInfoPage, purgeable) {
  195.     {
  196.     {6, 150, 22, 166},         // Predefined values
  197.     kDETNoFlags, kDETAspectMainBitmap,
  198.     Bitmap { kDETSmallIcon };
  199.  
  200.     {kFunctionTop, kFunctionLeft, kFunctionBottom, kFunctionRight}, kDETNoFlags, kDETNoProperty,
  201.     StaticTextFromView {kDETApplicationFont,kDETApplicationFontSize, kDETRight, kDETBold,
  202.         "Job description" };
  203.  
  204.     {kTEFunctionTop, kTEFunctionLeft, kTEFunctionBottom, kTEFunctionRight}, kDETMultiLine, kFunction,
  205.     EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal };
  206.  
  207.  
  208.     {kSublistSeeAlsoTop, kSublistSeeAlsoLeft, kSublistSeeAlsoBottom, kSublistSeeAlsoRight},
  209.     kDETNoFlags, kDETPrName,
  210.     StaticCommandTextFromView { kDETDefaultFont, kDETDefaultFontSize, kDETLeft, kDETUnderline,
  211.         "Name",kDETChangeViewCommand, -1 };
  212.         
  213.     {kSublistKindTop, kSublistKindLeft, kSublistKindBottom, kSublistKindRight},
  214.     kDETNoFlags, kDETPrKind,
  215.     StaticCommandTextFromView { kDETDefaultFont, kDETDefaultFontSize, kDETLeft, kDETNormal,
  216.         "Kind",kDETChangeViewCommand, -2 };
  217.  
  218.     {kSublistTop-1, kSublistLeft-1, kSublistBottom+1, kSublistRight+1}, kDETNoFlags, kDETNoProperty,
  219.         Box { kDETUnused };        
  220.  
  221.     
  222.     }
  223.                     
  224. };
  225.  
  226. //------------------  Sublist viewlist - Description of an entry in the sublist
  227.  
  228. resource 'detv' (kEInfoPage+1, purgeable) {
  229.     {
  230.         {kDETSublistEntryTop, kDETSublistIconColumnLeft, kDETSublistEntryBottom, kDETSublistIconColumnRight},
  231.         kDETEnabled, kDETAspectMainBitmap,
  232.         Bitmap { kDETMiniIcon };
  233.  
  234.         {kDETSublistEntryTop, kSeeAlsoColumnLeft, kDETSublistEntryBottom, kSeeAlsoColumnRight},
  235.         kDETEnabled  + kDETDynamicSize, kDETPrName,
  236.         EditText { kDETDefaultFont, kDETDefaultFontSize, kDETLeft, kDETItalic };
  237.         
  238.         {kDETSublistEntryTop, kKindColumnLeft, kDETSublistEntryBottom, kKindColumnRight},
  239.         kDETEnabled  + kDETDynamicSize, kDETPrKind,
  240.         EditText { kDETDefaultFont, kDETDefaultFontSize, kDETLeft, kDETNormal };
  241.  
  242.     }
  243. };
  244.  
  245.  
  246.